import { C31UserDetailsOverview, Layout } from "@/components";
import { useUserInfo } from "@/store/userDataContext";

export default function UserDetailsOverview() {
  const { userInfoState } = useUserInfo();
  const { userData, userPageData } = userInfoState;

  return (
    <Layout>
      {userData && (
        <C31UserDetailsOverview
          userDetails={userData.userInfo}
          addressDetails={userData.userInfo.defaultAddress}
          imagePaths={{
            topBgUrl: userPageData?.topBackgroundImage ?? "",
            centerBgUrl: userPageData?.centerBackgroundImage ?? "",
          }}
        />
      )}
    </Layout>
  );
}
